<?php
/**
 *  helper
 * @author Trunghpb
 */
class TopView extends selfHelper {
    public function page_load() {
        $module = ModuleMn();
        $module_info = $module->getModuleForRoll($this->client_user->roll_id);

        $horizontalTabPanel = new HorizontalPanel();

        foreach($module_info as $key => $tab) {
            $horizontalTabPanel->addTab($tab['module_id'], $tab['module_name'], $tab['module_url'], HorizontalPanel::ACTION_ANCHOR);
        }

        $panel = new TwoPanelDecorator();
        $panel->addTopPart(horizontalTabPanel);
        $panel->view();
    }
}
?>
